package com.wgu.crawl.service.impl;

import com.wgu.crawl.CrawlType;
import com.wgu.crawl.repo.CrawlTypeRepository;
import com.wgu.crawl.service.CrawlTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.transaction.Transactional;
import java.util.List;

/**
 * @Author: w
 * @Date: 2019/6/27 14:30
 * @Version 1.0
 */
@Service
public class CrawlTypeServiceImpl implements CrawlTypeService {
    @Resource
    private CrawlTypeRepository crawlTypeRepository;

    @Override
    @Transactional
    public CrawlType save(CrawlType crawlType) {
        return crawlTypeRepository.save(crawlType);
    }

    @Override
    public List<CrawlType> getAllType() {
        return crawlTypeRepository.findAll();
    }
}
